import { Injectable } from '@nestjs/common';
import { Cron } from '@nestjs/schedule';
import { UserService } from '../admin/user/user.service';

@Injectable()
export class ResetService {
    constructor(
        private readonly userService: UserService,
    ) { }
    @Cron('0 0 * * *') // 每天0点
    // @Cron('*/1 * * * *') // 每分钟执行一次
    async handleCron() {
        console.log('每天0点重置courseNum 字段');
        // await this.userService.resetCourse();
        console.log('数据重置完成');
    }
}
